// pages/me/rule/rule.js
import Util from '../../../utils/utils';
Page({
  /**
   * 页面的初始数据
   */
  autoAuth:false,
  data: {
    version:Util.version,
    pageData:[
      {
        name:'用户协议',
        path:'https://page.quzhao.com/copyright/protocol.html',
        version: 1
      },
      {
        name:'隐私政策',
        path:'https://page.quzhao.com/copyright/licence.html',
        version: 1
      }
    ]
  },
  initPage: function () {
    let app = getApp();
    wx.hideShareMenu();
    if(app.globalData.pageConfig.rulePage){
      let data = app.globalData.pageConfig.rulePage;
      if(Util.baseUrl.indexOf('tangzi') > -1){
        data.push({
          name:'测试工具',
          path:'/pages/me/tool/index',
          version: 1
        });
      }
      this.setData({
        pageData:data
      });
    }
  },
});
